{% extends 'index.html' %}
{% load i18n %}
{% load pagination_tags %}
{% block title %}Series.TopoRojo.es | {% trans "Search" %}{%endblock%}
{%block breadcrumb%}<small><a href="/">{% trans "Home" %}</a> >> <a href="/search/">{% trans "Search" %}</a></small>{% endblock breadcrumb%}
{% block content %}
    <h2>{% trans "Search" %}</h2><br />
        <form method="get" action=".">
                <table>
                    {{ form.as_table }}
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            <input type="submit" value='{% trans "Search" %}'>
                        </td>
                    </tr>
                </table>
                {% if query %}
                       <br /><h3>{% trans "Results" %}</h3><br />
                        {% if page %}
                                {% autopaginate page.object_list %}
                                <ul>
                                {% for result in page.object_list %}
                                        <li>
                                                <a href="{{ result.object.get_absolute_url }}">{{ result.object.serie }} {{ result.object.name }}</a>
                                        </li>
                                        {% empty %}
                                                <li>{% trans "No results found" %}.</li>
                                {% endfor %}
                                </ul>
                                <br/><br />
                                {% paginate %}
                        {% endif %}
                {% else %}
                        {# Show some example queries to run, maybe query syntax, something else? #}
                {% endif %}
        </form>
{% endblock %}
{%block footer%}<p><a href="/series/">{% trans "Back" %}</a></p>{%endblock%}